﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace ManagementClinic.Data.DataContext
{
    public interface IRepository<T>
    {
        bool Insert(T entity);
        void Delete(T entity);
        List<T> Get(Expression<Func<T, bool>> predicate);
        List<T> Get(Expression<Func<T, bool>> predicate, string fieldOrderBy, bool ascending, int skip, int take);
        List<T> Get(Expression<Func<T, bool>> predicate, string fieldOrderBy, bool ascending);
        List<T> GetAll();
        T GetById(int id);
    }
}
